http://www.pld.ttu.ee/applets/td/td.html